/* 
 * File:   NewB2OEvent.h
 * Author: aljosa
 *
 * Created on June 27, 2010, 3:04 PM
 */

#ifndef _NEWB2OEVENT_H
#define	_NEWB2OEVENT_H

#include "Color4.h"
#include "Vector3.h"
#include <vector>
#include "Event.h"
using namespace xEngine::Renderer;
using namespace xEngine::PlatformIndependent::Math;

namespace xEngine
{
    namespace CoreSystem
    {
        namespace Events
        {

            enum TYPE {
                STATIC, DYNAMIC
            };

            enum SHAPE {
                RECT, CIRCLE, POLY
            };

            enum VISUAL {
                COLOR, TEXTURE
            };

            struct MaterialData {
                float density, restitution;

                MaterialData() : density(0), restitution(0) {  }
            };

            struct ShapeData {
                vector<Vector3> *vertices;
                float radious;
                float w, h;

                ShapeData() : vertices(NULL), radious(0) {  }
            };

            struct VisualData {
                    Color4 *border;
                    Color4 *fill;
                    string *texture;
                    float repeatX, repeatY;

                    VisualData() : border(NULL), fill(NULL), texture(NULL), repeatX(0.0f), repeatY(0.0f) {  }
            };

            class NewB2OEvent : public Event {
            public:
                NewB2OEvent();
                virtual ~NewB2OEvent();

                TYPE phyType;
                SHAPE shape;
                VISUAL visual;

                // Data (pointers)
                VisualData visualData;
                ShapeData shapeData;
                MaterialData materialData;
                
                Vector3 position;

                string objName;


            private:

            };

        }
    }
}

#endif	/* _NEWB2OEVENT_H */

